//
//  FootView.m
//  WhereToTravel
//
//  Created by dlios on 15/10/13.
//  Copyright © 2015年 zhoushengmin. All rights reserved.
//

#import "FootView.h"

@implementation FootView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [[NSNotificationCenter defaultCenter] postNotificationName:@"night" object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(night) name:@"night" object:nil];
        
        self.footLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
        [self addSubview:self.footLabel];
        self.footLabel.font = [UIFont systemFontOfSize:18];
    }
    return self;
}

- (void)night {
    if ([SingletonNight shareSingletonNight].isSelete == YES) {
        self.footLabel.textColor = [UIColor whiteColor];
    }
    else {
        self.footLabel.textColor = [UIColor blackColor];
    }
}

- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"night" object:nil];
}



@end
